home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 9369 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.5 KB

  1. Path: gail.ripco.com!mambuhl
  2. From: mambuhl@ripco.com (Martin Ambuhl)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Can C save and retrei
  5. Date: 9 Mar 1996 18:52:01 GMT
  6. Organization: Ripco Communications, Inc.
  7. Message-ID: <4hsk0h$j8m@gail.ripco.com>
  8. NNTP-Posting-Host: foley.ripco.com
  9.  
  10. Teddy Bear <s7700038@singnet.com.sg>
  11. in <4hpd14$hel@lantana.singnet.com.sg> asks:
  12.  
  13. >Can anyone teach me or refer me or help in any way?
  14. >I need to save to disk and retrieve from disk
  15. >Can anyone help me
  16. >The prog goes
  17.  
  18. [followed by 438 lines of code]
  19.  
  20. As strange as it seems, I actually tried to rescue this code.  Not only
  21. does it depend on non-standard functions, include useless headers
  22. (alloc.h), leave out necessary headers (ctype.h), but it is otherwise a
  23. complete mess.  You don't have to look far for examples - check main()
  24. where you test input characters before getting them.  It did not take
  25. long to realize I would need to completely rewrite this code.  Whoopie.
  26.  
  27. Turn on all your warnings, use whatever flags you need to make the
  28. compiler think it is an ANSI C compiler, and then post small examples of
  29. problems you encounter for which you need help.
  30.  
  31. Try to write your code using the standard library.  This will involve
  32. not using clrscr(), getch[e](), etc., but learn C first before
  33. exercising all the neat-o extensions your implementation offers.  BTW,
  34. `flushall()' is spelled `fflush(NULL)'.
  35.  
  36.                                           
  37. --
  38. * Martin Ambuhl       net: mambuhl@ripco.com
  39. * Chicago, IL (USA)    
  40.